Upgrade to Ruby 3 / Rails 7 and remove node.js dependency #55
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in #34 this brings hdm to the current versions of ruby and rails.
Furthermore I removed the old
webpacker
-based asset handling and replaced it with a combination ofimportmaps-rails
anddartsass-rails
.The former allows serving unbundled JS in a clever way, the latter includes a standalone executable of a current, maintained SCSS implementation. Taken together, this means hdm no longer requires node.js.
I tried to adjust the documentation and
Dockerfile
accordingly, but I might have missed something. @rwaffen: I suspect theDockerfile
can be simplified even more now, but I do not understand what is going on 100%, so you might want to have another look.The biggest change when it comes to day to day work with the application, is that for development purposes it no longer suffices to run
rails server
. Instead one can use thebin/dev
script, that is a small wrapper aroundforeman
(the process manager, not the devops tool).foreman
simply starts processes defined inProcfile
. Besides the rails server there is now also a command to start asass
process that watches for changes to.scss
files and compiles them if needed.This is for development purposes only. In a production installation, nothing should change. There, assets need not be compiled on-the-fly, but with the
bin/rails assets:precompile
task once for every deployment/update. Also, for production purposes, the application should run in theproduction
rails environment. This is either achieved by starting the server with-e production
or via setting theRAILS_ENV
environment variable.I am pretty sure we discussed this before, but I could find neither in the existing documentation and scripts. Before this change, this was not a huge issue, but when this is merged, it will lead to problems.